package xdu.lz.protocol.socekt;

import xdu.lz.framework.RequestWrap;
import xdu.lz.framework.URL;
import xdu.lz.protocol.Protocol;

/**
 * 基于Socket通信
 * @date 2020/5/15 23:00
 */
public class SocketProtocol implements Protocol {
    @Override
    public String refer(URL url, RequestWrap invocation) {
        return new SocketClient()
                .refer(url.getHostname(),url.getPort(),invocation);
    }

    @Override
    public void export(URL url) {
         new RedisServer().
                 export(url.getHostname(),url.getPort());
    }
}
